// 例：cursor_pointer：cursor：pointer
$cursors: pointer, not-allowed;

@for $i from 1 through length($cursors) {
    $cursor: nth($cursors, $i);

    .cursor_#{$cursor} {
        cursor: $cursor;
    }
}

// 例:pdr_0 就是设置padding-right:0;margin-right:0;
$distances: top, bottom, left, right, '';
$distancesimples: 't', 'b', 'l', 'r', '';

@for $i from 1 through length($distancesimples) {
    $distancesimple: nth($distancesimples, $i);
    $distance: nth($distances, $i);

    @for $j from 0 through 1000 {
        .pd#{$distancesimple}_#{$j} {
            @if $i <=4 {
                padding-#{$distance}: #{$j}px !important;
            }

            @else {
                padding: #{$j}px !important;
            }
        }

        .mg#{$distancesimple}_#{$j} {
            @if $i <=4 {
                margin-#{$distance}: #{$j}px !important;
            }

            @else {
                margin: #{$j}px !important;
            }
        }
    }
}

// 例：ellipsis_3设置最多展示三行省略;
@for $i from 1 through 10 {
    .ellipsis_#{$i} {
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: #{$i};
        -webkit-box-orient: vertical;
        display: -moz-box;
        -moz-line-clamp: #{$i};
        -moz-box-orient: vertical;
        word-wrap: break-word;
        word-break: break-all;
        white-space: normal;
    }
}

@for $i from 100 through 500 {
    .select_max_width_#{$i} {
        max-width: #{$i}px !important;

        .el-select-dropdown {
            min-width:#{$i}px !important;
        }
    }
}

// 例:flex_align_center 就是设置padding-right:0;margin-right:0;
.flex {
    display: flex;

    &.align_items_center {
        align-items: center;
    }

    &.justify_content_center {
        justify-content: center;
    }
}